import { h } from 'vue'

export default {
  name: 'Render',
  props: ['scope', 'column', 'pageSize', 'currentPage'],
  render: function () {
    const { scope, column, pageSize, currentPage } = this
    scope.column = scope.column || column
    // console.log('[ scope.column---- render] >', scope, column)
    scope.pageSize = scope.pageSize || pageSize
    scope.currentPage = scope.currentPage || currentPage
    if (column.render && typeof column.render === 'function')
      return column.render.call(this, h, scope)
    return null
  },
}
